package com.lengxf.design;

public class ActionNode extends AbstractNode {

    private final String action;

    public ActionNode(String action) {
        this.action = action;
    }

    @Override
    public String interpret() {
        return switch (action) {
            case "move" -> "移动";
            case "run" -> "快速移动";
            default -> throw new RuntimeException("not found");
        };
    }


}
